<?php

defined('SYSTEM_PATH') or die('Han che truy cap');

class Object
{
    protected function __construct()
    {
        ;
    }
    
    protected function register($propertyName,$value,$arrayKey = NULL)
    {
        if(!is_null($arrayKey))
        {
            if(!property_exists($this,$propertyName))
                $this->$propertyName = array();
            $arr =& $this->$propertyName;
            $arr[$arrayKey] = $value;
        }
        else
        {
            $this->$propertyName = $value;
        }
    }
}
